package com.createidea.cms.utils;

import java.util.ArrayList;
import java.util.Arrays;

public class Test {
	
	private String name;
	public static void main(String[] args) {
		ArrayList<Test> list1=new ArrayList(Arrays.asList(new Test("1"),new Test("2")));
		ArrayList<Test> list2=new ArrayList(Arrays.asList(new Test("1"),new Test("2"),new Test("3")));
		
		list2.removeAll(list1);
		if(new Test("1").equals(new Test("1")))
			System.out.println("eee");
}
	
	
	public Test(String name) {
		super();
		this.name = name;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Test other = (Test) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
	
}